package com.lsj.controller;

import com.lsj.pojo.ShangBang;
import com.lsj.service.SbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/lsj")
public class testController {
    @Autowired
    private SbService sbService;
    @RequestMapping("/nihao2")
    public String testa(String id){
        ShangBang sb = sbService.get(id);
        if(sb==null){
            return "没有这个人";
        }
        return "你好"+sb.getName();
    }
}
